<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  
  <style>
    .left {
      position: absolute;
      left: 100px;
      top: 0px;
      padding: 20px;
      border: 1px solid #000;
    }
    li {
      list-style: none;
      width: 100px;
      height: 30px;
      background-color: aqua;
      margin-bottom: 5px;
    }
    .right {
      position: absolute;
      left: 500px;
      top: 0px;
      padding: 20px;
      border: 1px solid #000;
    }
  </style>
  <body>
    <div class="left">
      <li></li>
      <li></li>
      <li></li>
      <li></li>
      <li></li>
    </div>
    <div class="right"></dir>
      <script>
        var temp 
        var oLi = document.getElementsByTagName('li');
        for(let i = 0 ; i <oLi.length;i++){
          oLi[i].setAttribute('draggable',true);
          oLi[i].ondragstart = function(e){
            console.log(e)
            temp =  e.target
          }
        }
        var right = document.getElementsByClassName("right")[0];
        // console.log(right)
        right.ondragover = function(e){
          e.preventdefault();
        }
        right.ondrop = function(){
          this.appendChild(temp)
          temp = null
        }
      </script>
  </body>
</html>
